<?php
use yii\rbac\DbManager;

return [
    'vendorPath' => dirname(dirname(__DIR__)) . '/vendor',
    'language'=>'zh-CN',
    'components' => [
        'cache' => [
            'class' => 'yii\caching\FileCache',
        ],
        //在yii2中使用redis
        'redis' => [
            'class' => 'yii\redis\Connection',
            'hostname' => 'localhost',
            'port' => 6379,
            'database' => 0,
        ],
        /*'cache'=>[
            'class'=>'yii\redis\Cache',
        ],*/
        /*'session'=>[
            'class'=>'\yii\redis\Session',
        ],*/
        'sphinx' => [
            'class' => 'yii\sphinx\Connection',
            'dsn' => 'mysql:host=127.0.0.1;port=9312;',
            'username' => 'NoZ09FAyiishop',
            'password' => 'k8RhTz3!QMfUbt',
        ],
        //配置RBAC 基于角色的存取控制器
        'authManager'=>[
//            'class'=>'yii\rbac\DBmanager',
              'class'=>DbManager::className(),
//            'itemTable'=>'',//即角色和权限
//            'itemChildTable'=>'',
//            'assignmentTable'=>'',//授权条目对用户的指派情况
//            'ruleTable'=>'',//表存放规则
        ],
    ],
];
